<!doctype html>
<meta charset="utf-8">
<title>Removing link tag should remove associated styles</title>
<link rel="stylesheet" type="text/css" href="remove_link_styles.css">
<link rel="match" href="remove_link_styles_ref.html">
<body>
    <style>
        body {
            color: green;
        }
    </style>

    This text should be green and the background should not be red.

    <script>
        var l = document.querySelector('link[rel="stylesheet"]');
        l.parentNode.removeChild(l);
    </script>
</body>
